import React, { useEffect, useState, useRef } from 'react';
import { Video, View } from '@tarojs/components'
import Taro from '@tarojs/taro';
export default (props) => {
    const { src } = props
    return <View onClick={() => {
        Taro.previewMedia({
            sources: [{
                url: src,
                type: 'video'
            }]
        })
    }} style={{ background: '#F5F5F5', width: '100%', height: '100%', position: 'relative' }}>
        <View style={{
            position: 'absolute', top: '0', left: '0', right: '0',
            bottom: '0', width: '100%', height: '100%', zIndex: 100
        }}></View>
        <Video mode='aspectFit' style={{ width: '100%', height: '100%' }} {...props}>

        </Video>
    </View>
};
